<template>
	<view class="mymap">
		<web-view src="https://i.ringzle.com/weather/"></web-view>
	<!-- 	<view class="toptq">
			<view class="content"> -->
				<!--今天-->

				<!--城市名称 当前日期-->
			<!-- 	<view class="city">{{weather.city}} {{weather.reporttime}}</view> -->
				<!--当天温度-->
			<!-- 	<view class="temp">{{todadydata.daytemp}}℃</view> -->



				<!--昨天-->
			<!-- 	<view class="yesterday">
					<view class="detail1">
						{{todadydata.date}}星期{{todadydata.week}}
					</view>
					<view class="detail2">
						<view class="">
							{{todadydata.dayweather}}转 {{todadydata.nightweather}}
						</view> -->
						<!--天气类型，如阴、晴-->
					<!-- 	<view class="">
							{{todadydata.daywind}}风，风速 {{todadydata.nightpower}}
						</view>
						<view class="">
							最高气温 {{todadydata.daytemp}} 最低气温 {{todadydata.nighttemp}}
						</view>

					</view>
				</view>
			</view>
		</view> -->

		<!--最近五天天气信息-->
		<!-- <view class="forecast">
			<view class="next-day" v-for="(item,index) in weather.casts" :key="item"> -->
				<!--日期-->
			<!-- 	<view class="detail date">{{item.date}}</view> -->
				<!--天气类型-->
			<!-- 	<view class="detail">{{item.dayweather}}</view> -->
				<!--最高温度-->
			<!-- 	<view class="detail">{{item.daytemp}}</view> -->
				<!--最低温度-->
			<!-- 	<view class="detail">{{item.nighttemp}}</view> -->
				<!--风向-->
				<!-- <view class="detail">{{item.daywind}}</view> -->
				<!--风力-->
			<!-- 	<view class="detail">{{item.nightpower}}</view>
			</view>
		</view>


		<u-overlay :show="showtianqi">
			<view class="warp">
				<u-loading-icon text="加载中" textSize="48"></u-loading-icon>
			</view>
		</u-overlay> -->
	</view>
</template>

<script>
	//   var myAmapFun = new amapFile.AMapWX({key:'4250d90eec4a2bcaaf9c4f486d2ad623'});
//	let amap = require('../../../utils/amap-wx.130.js');


	export default {
		data() {
			return {
				showtianqi: true,
				weather: [],
				todadydata: {},

			}
		},
		onLoad(options) {
			//this.getqhdata();

		},
		methods: {
			// getqhdata() {
			// 	this.showtianqi = true;
			// 	var myAmapFun = new amap.AMapWX({
			// 		key: '4250d90eec4a2bcaaf9c4f486d2ad623'
			// 	});
			// 	myAmapFun.getWeather({
			// 		type: 'forecast', //表示获取的是预报信息 默认live（实时天气）
			// 		success: (data)=> {
			// 			//  console.log(data.forecast)
			// 			if (data.forecast.casts.length > 3) {
			// 				this.showtianqi = false;
			// 				this.weather = data.forecast
			// 				this.todadydata = data.forecast.casts[0];
			// 				console.log('111111111111111111', this.weather, this.todadydata)
			// 			} else {
			// 				this.showtianqi = true;
			// 				this.weather = []
			// 				this.todadydata = {};
			// 			}

			// 		},
			// 		fail: function(info) {
			// 			//失败回调
			// 			console.log(info)
			// 		}
			// 	});
			// }


		}
	}
</script>

<style>
	.warp {
		display: flex;
		align-items: center;
		justify-content: center;
		height: 100%;
	}

	.rect {
		width: 120px;
		height: 120px;
		background-color: #fff;
	}

	.mymap {
		width: 750rpx;
		height: calc(100vh - 60px);
	}

	.toptq {
		width: 750rpx;
		height: 925rpx;
		background-image: url('https://i.ringzle.com/file/20231110/73ae667744104ed08a6c5f61fda52eaa.png');
		background-repeat: no-repeat;
		background-size: contain;
	}



	.detail1 {
		height: 80rpx;
		font-size: 36rpx;
		font-family: PingFang SC;
		font-weight: 400;
		line-height: 80rpx;
		color: #FFFFFF;
	}

	.detail2 {
		height: 50rpx;
		font-size: 34rpx;
		font-family: PingFang SC;
		font-weight: 400;
		line-height: 50rpx;
		color: #FFFFFF;
	}

	.content {
		height: 100%;
		width: 750rpx;
		display: flex;
		flex-direction: column;
		font-family: 微软雅黑, 宋体;
		box-sizing: border-box;
		padding: 20rpx 10rpx;
		font-size: 16px;
	}

	/*当天天气信息*/

	.info {
		margin-top: 50rpx;
		width: 100%;
		height: 240px;
	}

	/*城市名称*/

	.city {
		margin: 20rpx;
		height: 80rpx;
		line-height: 80rpx;
		border-bottom: 1px solid #043567;
		color: #fff;
	}

	/*当天温度*/

	.temp {
		font-size: 120rpx;
		line-height: 230rpx;
		height: 300rpx;
		text-align: center;
		padding-top: 20rpx;
		color: #fff;
	}

	/*感冒描述*/

	.weather {
		line-height: 22px;
		margin: 10px 0;
		padding: 0 10px;
	}

	/*昨天天气信息*/

	.yesterday {
		width: 710rpx;
		height: 400rpx;
		margin: 0 auto;
		border-radius: 10rpx;
		border: 1px solid #043567;
		background: rgba(0, 0, 0, 0.1);
		border-radius: 10px;
	}

	/*昨天的*/

	.yesterday-title {
		color: red;
	}

	/*最近五天天气信息*/

	.forecast {
		width: 100%;
		display: flex;
		margin-top: 50rpx;
		justify-content: space-between;
	}

	/*每一天的天气信息*/

	.next-day {
		width: 20%;
		height: 450rpx;
		text-align: center;
		line-height: 30px;
		font-size: 14px;
		margin: 0 3rpx;
		border: 1px solid #043567;
		border-radius: 10rpx;
	}

	/*日期*/

	.date {
		margin-bottom: 20rpx;
		border-bottom: 1px solid #043567;
		color: #f29f39;
	}

	/*搜索区域*/

	.search-area {
		display: flex;
		background: #f4f4f4;
		padding: 1rem 0.5rem;
	}

	/*搜索区域的输入框*/

	.search-area input {
		width: 70%;
		height: 38px;
		line-height: 38px;
		border: 1px solid #ccc;
		box-shadow: inset 0 0 0 #ccc;
		color: #000;
		background-color: #fff;
		border-radius: 5px;
	}

	/*搜索区的按钮*/

	.search-area button {
		width: 30%;
		height: 40px;
		line-height: 40px;
		margin-left: 5px;
	}
</style>